package skewreduce.lsst;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class PixVal extends Coord {
    @Override
	public void readFields(DataInput arg0) throws IOException {
		super.readFields(arg0);
		val = arg0.readDouble();
	}
    
	@Override
	public void write(DataOutput arg0) throws IOException {
		super.write(arg0);
		arg0.writeDouble(val);
	}

	private double val;

    public PixVal() {}
    
    public PixVal(int x,int y,double v) {
        super(x,y);
        val = v;
    }

    public double getVal() { return val; }

    @Override
    public String toString() {
        return String.format("(%d,%d,%f)",x,y,val);
    }
}
